#include <stdio.h>
// IEDA: keep the first blank. Remember blank is ' ', but not '\0'.

int main()
{
    int c;

    while ((c = getchar()) != EOF)
    {
        if (c != ' ')
            putchar(c);
        else
        {
            putchar(c);
            while ((c = getchar()) == ' ')
                ;
            putchar(c);
        }
    }
    return 0;
}